package com.wy.demo.controller;

import com.wy.demo.pojo.TBbrand;
import com.wy.demo.service.MyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @描述
 * @创建人 wangyue
 * @创建时间2020/12/715:07
 */
@RestController
@RequestMapping("my")
@Slf4j
public class MyController {

    @Resource
    private MyService myService;

    @RequestMapping("getMap")
    public Map<String,Object> getMap(){
        log.debug("debug message");
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("name","张三");
        return hashMap;
    }

    @RequestMapping("getAll")
    public List<TBbrand> getAll(){
       // Logger.DEBUG()
        return myService.getAll();
    }
}
